<link href="<@sp.static/>/assets/plugins/bootstrap/css/bootstrap.min.css?v=0" rel="stylesheet"/>
<link href="<@sp.static/>/assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
<link href="<@sp.static/>/assets/css/style.min.css?v=1" rel="stylesheet"/>
<link href="<@sp.static/>/assets/plugins/datatables/css/data-table.css" rel="stylesheet"/>
<div style="overflow: auto; min-height: 420px; position: relative; margin: 8px;">
    <div class="panel panel-inverse pop-panel" data-sortable-id="form-stuff-5">
        <div class="panel-body">
            <form id="groupForm" name="groupForm" method="post" class="form-inline">
                <input style="width:160px;" type="text" placeholder="分组ID" class="form-control" name="EQ_id">
                <input style="width:200px;" type="text" placeholder="分组名称" class="form-control" name="LIKE_name">&nbsp;
                <button type="button" class="btn btn-success btn-sm"
                      onclick="postDataByForm('${rc.contextPath}/backend/couponGroup/quickSearch', 'groupList', 'groupForm');">
                      <i class="fa fa-search"></i>
                      查询
                </button>
                <button type="button" class="btn btn-danger btn-sm"
                      onclick="getData('${rc.contextPath}/backend/couponGroup/add', 'displayArea', true)">
                      <i class="fa fa-plus"></i>
                      新增分组
                </button>
            </form>
        </div>
    </div>
    <div class="pop-list" id="groupList"></div>
    <div class="pop-footer">
        <button type="button" id="selectedButton" class="btn btn-sm btn-success m-5">确定</button>
    </div>
</div>
<!-- jquery -->
<script src="<@sp.static/>/js/jquery/jquery-3.0.0.min.js" type="text/javascript" charset="UTF-8"></script>
<!-- jquery validate -->
<script src="<@sp.static/>/js/jquery/validation/jquery.validate.min.js" type="text/javascript" charset="UTF-8"></script>
<script src="<@sp.static/>/assets/plugins/jquery-ui/ui/minified/jquery-ui.min.js"></script>
<script src="<@sp.static/>/assets/plugins/bootstrap/js/bootstrap.min.js"></script>
<script src="<@sp.static/>/js/layer/layer.js" type="text/javascript" charset="UTF-8"></script>
<script src="<@sp.static/>/js/custom/util.js" type="text/javascript" charset="UTF-8"></script>
<script src="<@sp.static/>/js/custom/message.js" type="text/javascript" charset="UTF-8"></script>
<script src="<@sp.static/>/js/custom/send.js" type="text/javascript" charset="UTF-8"></script>
<script type="text/javascript" language="javascript">
    $(function () {
        postDataByForm('${rc.contextPath}/backend/couponGroup/quickSearch?v='+Math.random(), 'groupList', 'groupForm');
    });
    $(function () {
        $('#selectedButton').click(function () {
            parent.$('#groupName').empty();
            parent.$('#groupId').empty();
            $("input:radio[name='id']:checked").each(function (index, elem) {
                var groupName = $(elem).parent().parent().find("input[name='NameTD']").val();
                var groupId = $(elem).parent().parent().find("input[name='IdTD']").val();
                parent.$('#groupName').val(groupName);
                parent.$('#groupId').val(groupId);
            });
            parent.layer.closeAll();
        });
    });
</script>